/**
 * 
 */
package com.lanswon.controller.admin;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lanswon.common.enums.ArticleStatus;
import com.lanswon.common.enums.ArticleType;
import com.lanswon.common.util.StringUtil;
import com.lanswon.dao.AboutUsMapper;
import com.lanswon.entity.AboutUs;
import com.lanswon.entity.ArticleVO;
import com.lanswon.service.AboutService;
import com.lanswon.service.ArticleService;

/**
 * 
 * @ClassName: AdminAboutUs.java
 * @Description: 该类的功能描述
 *
 * @version: v1.0.0
 * @author: zm
 * @date: 2018年6月20日 上午11:29:09
 *
 */
@Controller
@RequestMapping("admin/aboutUs")
public class AdminAboutUsController {
	@Autowired
	private AboutService aboutService;

	@RequestMapping("index")
	public String index(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) {
		modelMap.addAttribute("aboutUs", aboutService.load());
		return "admin/aboutUs/index";
	}

	@RequestMapping("update")
	@ResponseBody
	public Map<String, Object> update(HttpServletRequest request, HttpServletResponse response, AboutUs aboutUs) {
		return aboutService.update(aboutUs);
	}

}
